package com.epam.tcs.dao.hibernate.entities;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import java.util.List;

@Entity
@DiscriminatorValue(value = "0")
public class Lecture extends ThemeItem{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2245451216442536236L;
	
	private List<JournalLectureStatus> journalLectureStatuses;
	
	public void setJournalLectureStatuses(List<JournalLectureStatus> journalLectureStatuses) {
		this.journalLectureStatuses = journalLectureStatuses;
	}
	
	@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "lecture")
	public List<JournalLectureStatus> getJournalLectureStatuses() {
		return journalLectureStatuses;
	}
}

